package com.chi.proxy;

import java.lang.reflect.Proxy;

/**
 * @author chi  2017-06-22 23:15
 **/
public class TestProxy {

    public static void main(String[] args){
        //新建一个经纪人
        IStar o = (IStar)Proxy.newProxyInstance(Star.class.getClassLoader(), new Class[]{IStar.class}, new MyProxy());
        String sing = o.sing();
        System.out.println("返回结果:"+sing);
    }
}
